{%include file="m.index.header.tpl.php"%} 
<!--头部-->
<nav class="navbar navbar-default navbar-fixed-top  top" role="navigation">
  <div class="container-fluid">
    <div class="navbar-header" style=" width:100%;"> <a class="navbar-brand" href="javascript:history.go(-1);" style=" width:100%;  padding-right:0px;"> <span class="glyphicon glyphicon-arrow-left white"></span> 
      <!--    <span class="glyphicon glyphicon-pause white" style="margin-left:2%;"></span>--> 
      <span class="white" style="margin-left:10%">班级活动</span> <span class="glyphicon glyphicon-user white" style="float:right"></span> </a> </div>
  </div>
  <!-- /.container-fluid --> 
</nav>
<!--头部 end--> 
<!--主体部分-->
<div class="container" style="margin-top:70px;">
  <div class="row" style="margin-right:10%;">
    <div  class="text-right"> <a class="btn btn-primary" href="index.php?a=activitys.classadd&class_id={%$class_id%}">添加班级活动</a></div>
  </div>
  <!--row  end-->
  
  <div class="col-xs-12" style="margin-top:15px;margin-bottom:15px;">
    <div class="row"> 
    {%foreach from=$appoint_lists key=key item=value%} 
     <a href="index.php?a=activitys.classlist&class_id={%$value.class_id%}" {%if $value.class_id==$class_id%} class="btn btn-primary" {%else%} class="btn btn-default"{%/if%} style="margin-bottom:15px;">{%$value.class_name%}活动</a> 
     {%/foreach%} </div>
    <!--row  end--> 
    
  </div>
  <div class="row" style="margin-top:10px;">
    <form action="" method="post">
      <div class="col-sm-12 distance" >
        <div class="form-group">
          <label for="inputEmail3" class="col-sm-2 control-label">标题:</label>
          <div class="col-sm-10">
            <input type="text" class="form-control" value="{%$activitys_title%}" name="activitys_title">
          </div>
        </div>
      </div>
      <div class="col-sm-12 distance hierarchy" >
        <div class="form-group">
          <label for="inputEmail3" class="col-sm-2 control-label">开始时间:</label>
          <div class="col-sm-10">
            <input type="text" class="form-control" value="{%$from%}" id="from" name="from">
          </div>
        </div>
      </div>
      <div class="col-sm-12 distance hierarchy" >
        <div class="form-group">
          <label for="inputEmail3" class="col-sm-2 control-label">结束时间:</label>
          <div class="col-sm-10">
            <input type="text" class="form-control" value="{%$to%}" id="to" name="to">
          </div>
        </div>
      </div>
      <div class="col-xs-12  distance hierarchy2">
        <div class="form-group text-center" style="padding-top:0px;">
          <button type="submit" class="btn btn-success" style="width:80%">搜索</button>
        </div>
      </div>
    </form>
  </div>
  <div class="row" style="margin-top:15px;margin-left:1px; margin-right:1px;">
    <input type="hidden" name="a" value="activitys.classlist">
    <input type="hidden" name="class_id" value="{%$class_id%}">
    {%foreach from=$activitys_lists key=key item=value%}
    <table class="table table-striped table-bordered text-center"  id="middles">
      <tr>
        <td>活动标题</td>
        <td>{%$value.activitys_title%}</td>
      </tr>
      <tr>
        <td>提交人</td>
        <td>{%$value.user_name%}</td>
      </tr>
      <tr>
        <td>提交时间</td>
        <td>{%$value.create_time%}</td>
      </tr>
      <tr>
        <td>操作</td>
        <td ><a type="button" class="btn btn-warning  " href="index.php?a=activitys.classdetails&activitys_id={%$value.activitys_id%}&class_id={%$value.class_id%}%}" >查看</a> <a type="button" class="btn btn-danger  " href="index.php?a=activitys.classupdate&activitys_id={%$value.activitys_id%}&class_id={%$value.class_id%}" >修改</a></td>
      </tr>
    </table>
    {%/foreach%} </div>
</div>
<!--container  end--> 

<!--主体部分  end--> 
<!--底部--> 
{%include file="m.index.footer.tpl.php"%} 
<script>
  $(function() {
    $( "#from" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
	  changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#to" ).datepicker( "option", "minDate", selectedDate );
      }
    });
    $( "#to" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
      changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#from" ).datepicker( "option", "maxDate", selectedDate );
      }
    });
  });
</script>